﻿using System;
using System.Collections.Generic;
using BusinessLogic.Models.ValidationAttributes;
using Interfaces.Enums;
using Interfaces.Models;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace BusinessLogic.Models.LogicModels.Security
{
    public class Role : IRole
    {
        [NotNullValidator(Tag = RulesKeys.Required)]
        public Guid Id { get; set; }
        
        [EnumConversionValidator(typeof(RoleType), Tag = RulesKeys.EnumConversion)]
        public RoleType Type { get; set; }
        
        [ObjectCollectionValidator(typeof(IUser))]
        public ICollection<IUser> Users { get; set; }
    }
}
